﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TrangTrai.Data.Utils;
using System.Data.SqlClient;

namespace TrangTrai.Data.DAO
{
    public class HisDAOManagement
    {
        SqlConnection con;
        SqlCommand command;
        SqlDataReader re;
        public static HisDaoDataContext context = new HisDaoDataContext(ConnectionClass.getConnectionString());
         public HisDAOManagement()
         {
            //init();
        }
        private void init(){
            con = ConnectionClass.getConnection();
            command = con.CreateCommand();
        }
        public HisInfo[] getHis() {
            return context.getChoAnLog().ToArray();
        }
        public CuanHisStatus[] getCuanHis()
        {
            return context.cuanhisStatus().ToArray();
        }
        public AoHis[] getAoHis()
        {
            return context.getAo().ToArray();
        }
        public Status[] getStatus()
        {
            return context.getStatus().ToArray();
        }
        public FoodCodeInfo[] getFoodCode()
        {
            return context.getFoodCode().ToArray();
        }
    }
}
